Skip to content

BRD-1127: Rewrite CLAUDE.md around V2 (public-safe); add ValueObjects child doc#75

Merged
SteponasK merged 1 commit into
releases/2026.02from
BRD-1127/claude-md-update
Jul 3, 2026
Merged

BRD-1127: Rewrite CLAUDE.md around V2 (public-safe); add ValueObjects child doc#75
SteponasK merged 1 commit into
releases/2026.02from
BRD-1127/claude-md-update

Conversation

@SteponasK

Copy link
Copy Markdown
Member

Rewrite CLAUDE.md to durable best-practice per BRD-1127 (durable architecture + gotchas, no ticket/recency trivia, volatile values point to code, scoped child docs in code dirs; v1 treated as deprecated).

Jira: https://invertus.atlassian.net/browse/BRD-1127

Docs-only; no code affected.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors and updates the repository's documentation in CLAUDE.md to streamline guidance, explicitly deprecate V1, and add sections on price correctness and index alias semantics. It also introduces a new src/V2/ValueObjects/CLAUDE.md file detailing the architecture, conventions, and directory structure of V2 ValueObjects. The review feedback correctly identifies an inconsistency in CLAUDE.md where response-side types are incorrectly described as having builders and jsonSerialize(), and provides a code suggestion to clarify that they are parsed using fromArray() instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread CLAUDE.md
- **Facade**: `src/SyncV2Sdk.php`.
- **Config**: `src/Config/SyncConfigV2.php` — `appId` (must be a UUID), `apiUrl`, `token`, optional `targetIndex`.
- **Endpoints**: `/api/v2/applications/{appId}/...`.
- **Payloads**: strict immutable readonly ValueObjects in `src/V2/ValueObjects/` (BulkOperations, Index, Normalize, Product, Response, Search, SearchSettings, Synonym, Common), each with constructor validation, a builder, and a `jsonSerialize()` verified against a fixture. See `src/V2/ValueObjects/CLAUDE.md` for the conventions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The description states that all listed ValueObjects in src/V2/ValueObjects/ (including Response) have "a builder, and a jsonSerialize() verified against a fixture." However, as documented in src/V2/ValueObjects/CLAUDE.md, response-side types (Response/) do not use builders or jsonSerialize(), but are instead parsed using fromArray(). To avoid confusion, we should clarify that Response types are parsed from API responses rather than serialized as outgoing payloads.

Suggested change
- **Payloads**: strict immutable readonly ValueObjects in `src/V2/ValueObjects/` (BulkOperations, Index, Normalize, Product, Response, Search, SearchSettings, Synonym, Common), each with constructor validation, a builder, and a `jsonSerialize()` verified against a fixture. See `src/V2/ValueObjects/CLAUDE.md` for the conventions.
- **Payloads**: strict immutable readonly ValueObjects in `src/V2/ValueObjects/` (BulkOperations, Index, Normalize, Product, Search, SearchSettings, Synonym, Common), each with constructor validation, a builder, and a `jsonSerialize()` verified against a fixture. See `src/V2/ValueObjects/CLAUDE.md` for the conventions. Response-side types (`Response/`) are parsed from API responses using `fromArray()`.

@SteponasK SteponasK merged commit 40eb264 into releases/2026.02 Jul 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant